package com.txx.design.factory.simplefactory;

/*
 * @description //TODO  简单工厂  参考 Calendar类
 * @exception
 * @author tuxx
 * @date 2019/3/13 17:57
 */
public class Test {


    public static void main(String[] args) {
       /* ViedoFactory viedoFactory = new ViedoFactory();
        Viedo java = viedoFactory.getViedo("java");
        java.produce();*/

       //通过反射机制来尽量遵守开闭原则减少对工厂类的修改
        ViedoFactory viedoFactory = ViedoFactory.getInstance();
        Viedo viedo = viedoFactory.getViedo(JavaViedo.class);
        viedo.produce();
    }
}
